using System;

namespace Jaws.Core.Web
{
    /// <summary>
    /// Used when a post is served to the output stream.
    /// </summary>
    public class ServingEventArgs : EventArgs
    {
        /// <summary>
        /// Creates a new instance of the class and applies the specified body.
        /// </summary>
        public ServingEventArgs(string body, ServingLocation location)
        {
            Body = body;
            Location = location;
        }

        /// <summary>
        /// Gets or sets the body of the post. If you change the Body, 
        /// then that change will be shown on the web page.
        /// </summary>
        public string Body { get; set; }

        /// <summary>
        /// The location where the serving takes place.
        /// </summary>
        public ServingLocation Location { get; set; }

        /// <summary>
        /// Cancels the serving of the content.
        /// <remarks>If the serving is cancelled then the item will not be displayed.</remarks>
        /// </summary>
        public bool Cancel { get; set; }
    }
}